-- GENERATED SPELL FOR [Spirit of Ha-Khalan] --


function spell0_29018(pUnit, Event) --@Jagged Tooth Snap,n/a--
pUnit:FullCastSpellOnTarget(34370,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29018', 581, 1)
end

function spell1_29018(pUnit, Event) --@Powerful Bite,n/a--
pUnit:FullCastSpellOnTarget(48287,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29018', 5279, 1)
end

function spell2_29018(pUnit, Event) --@Thick Hide,Self--
pUnit:FullCastSpellOnTarget(50502,pUnit)
pUnit:RegisterEvent('Sorts_29018', 634, 1)
end

function Sorts_29018(pUnit, Event)
local choix_sorts_29018 = math.random(0, 2)
if choix_sorts_29018 == 0 then
pUnit:RegisterEvent('spell0_29018', 1, 1)
end
if choix_sorts_29018 == 1 then
pUnit:RegisterEvent('spell1_29018', 1, 1)
end
if choix_sorts_29018 == 2 then
pUnit:RegisterEvent('spell2_29018', 1, 1)
end
end

function mob29018_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29018', math.random(1500, 3000), 1)
end

function mob29018_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29018_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29018_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29018, 1, 'mob29018_Action')
RegisterUnitEvent(29018, 2, 'mob29018_Leave')
RegisterUnitEvent(29018, 3, 'mob29018_Kill')
RegisterUnitEvent(29018, 4, 'mob29018_Die')
